package com.cynoware.busappmas.model;


import android.content.Context;
import android.content.Intent;

import com.cynoware.busappmas.ui.Model1Activity;




public class DisplayModel{
	
	public static DisplayModel instance(){
		return mDisplayModel;
	}
	
	public void setDisplayModel(Context content, String model,String value){
		mCurModel = model;
		ExitApplication.getInstance().finish();
		Intent intent = new Intent();
		Class<?> modelplay = ConfigDataModel.DISPLAYMODEL.get(model);
		if(modelplay==null) modelplay=Model1Activity.class;
		System.out.println(model+"   "+modelplay);
    	intent.setClass(content, modelplay);  
    	intent.putExtra("name", value); 
    	content.startActivity(intent);
    	
	}
	
	public String getCurDisplayModel(){
		return mCurModel;
	}
	

	private String mCurModel;
	private static DisplayModel mDisplayModel = new DisplayModel();
}